import { createBrowserRouter } from 'react-router-dom'
import Layout from '@/pages/Layout'
import Month from '@/pages/Month'
import Year from '@/pages/Year'
import New from '@/pages/New'

const router = createBrowserRouter([
    {
        path: '/',
        element: <Layout />,
        children: [
            {
                path: 'year',
                element: <Year />
            },
            {
                index: true,
                path: 'month',
                element: <Month />
            }
        ]
    },
    {
        path: '/new',
        element: <New />
    },
    {
        path: '*',
        element: '404'
    }
])

export default router